import type { Application } from "../../App";
// @ts-ignore
import vtkFPSMonitor from "@kitware/vtk.js/Interaction/UI/FPSMonitor";
export function openPerformanceMonitor(ctx: Application) {
  const fpsMonitor = vtkFPSMonitor.newInstance();
  const fpsElm = fpsMonitor.getFpsMonitorContainer();
  fpsElm.style.position = "absolute";
  fpsElm.style.right = "10px";
  fpsElm.style.bottom = "10px";
  fpsElm.style.background = "rgba(255,255,255,0.5)";
  fpsElm.style.borderRadius = "5px";

  fpsMonitor.setContainer(document.querySelector("body"));
  fpsMonitor.setRenderWindow(ctx.window);

  // ctx.instance.setResizeCallback(fpsMonitor.update);
}
